<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('修改通知公告')" />
	<th:block th:include="include :: summernote-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-notice-add" th:object="${notice}">
        <div class="form-group">
            <label class="col-sm-2 control-label">标题：</label>
            <div class="col-sm-10">
                <input id="noticeTitle" name="title" class="form-control" type="text"  th:field="*{title}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">摘要：</label>
            <div class="col-sm-10">
                <textarea name="description" class="form-control" th:field="*{description}" ></textarea>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">内容：</label>
            <div class="col-sm-10">
                <textarea id="noticeContent" name="message" class="form-control"></textarea>
               <!-- <input id="noticeContent" name="message" th:field="*{message}" type="hidden" >
                <div id="editor" class="summernote" readonly></div>-->
            </div>
        </div>
    </form>
</div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: summernote-js" />
    <script type="text/javascript">
        var prefix = ctx + "system/notice";

        $(function() {
            $('.summernote').summernote({
                placeholder: '请输入公告内容',
                height : 192,
                lang : 'zh-CN',
                followingToolbar: false,
                dialogsInBody: true,
                callbacks: {
                    onImageUpload: function (files) {
                        sendFile(files[0], this);
                    }
                }
            });
            var content = $("#noticeContent").val();
            $('#editor').summernote('code', content);
        });

	</script>
</body>
</html>
